//
//  NewCell.swift
//  ReadHub
//
//  Created by 龙轶群 on 2017/7/30.
//  Copyright © 2017年 longyiqun. All rights reserved.
//

import Foundation
import UIKit
import MMCardView

// Card Cell 实体类
class NewsCell: CardCell {
    
    @IBOutlet weak var titleLabel: UILabel!
    @IBOutlet weak var summaryLabel: UILabel!
    @IBOutlet weak var publishDateLabel: UILabel!
    @IBOutlet weak var detailBtn: UIButton!
    
    private var callBack:(()->Void)?
    var url: String = ""
    
    // 唤起Nib
    override func awakeFromNib() {
        super.awakeFromNib()
    }
    
    // CallBack方法
    func clickCallBack(c:@escaping ()->Void) {
        self.callBack = c
        
    }
    
    // 返回self的callback
    @IBAction func clickAction() {
        if let c = self.callBack {
            c()
        }
    }
}
